import time
import threading

def study(name):
    time.sleep(3) #休眠3秒
    print(f'{name}，在学习。')

def feel(content):
    time.sleep(2)  # 休眠2秒
    print(f'{content}，在感受。')


if __name__ == '__main__':
    print(f'主线程开始：{time.ctime()}')

    t1 = threading.Thread(target=study, args=('小明',))
    t2 = threading.Thread(target=feel, args=('念头抛锚',))
    t1.start()
    t2.start()

    while True:
        length = len(threading.enumerate())
        print(f'当前线程数量: {length}')
        if length <= 1:
            break
        time.sleep(0.5)

    t1.join() #主线程等待t1线程执行结束
    t2.join() #主线程等待t2线程执行结束

    print(f'主线程结束：{time.ctime()}')
